3.1218 \(\int \frac {(a+b \tan (e+f x))^2}{(c+d \tan (e+f x))^2} \, dx\)

Optimal. Leaf size=126 \[ -\frac {(b c-a d)^2}{d f \left (c^2+d^2\right ) (c+d \tan (e+f x))}-\frac {2 (a c+b d) (b c-a d) \log (c \cos (e+f x)+d \sin (e+f x))}{f \left (c^2+d^2\right )^2}-\frac {x (b (c-d)-a (c+d)) (a (c-d)+b (c+d))}{\left (c^2+d^2\right )^2} \]

[Out]

-(b*(c-d)-a*(c+d))*(a*(c-d)+b*(c+d))*x/(c^2+d^2)^2-2*(-a*d+b*c)*(a*c+b*d)*ln(c*cos(f*x+e)+d*sin(f*x+e))/(c^2+d
^2)^2/f-(-a*d+b*c)^2/d/(c^2+d^2)/f/(c+d*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.22, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {3542, 3531, 3530} \[ -\frac {(b c-a d)^2}{d f \left (c^2+d^2\right ) (c+d \tan (e+f x))}-\frac {2 (a c+b d) (b c-a d) \log (c \cos (e+f x)+d \sin (e+f x))}{f \left (c^2+d^2\right )^2}-\frac {x (b (c-d)-a (c+d)) (a (c-d)+b (c+d))}{\left (c^2+d^2\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^2/(c + d*Tan[e + f*x])^2,x]

[Out]

-(((b*(c - d) - a*(c + d))*(a*(c - d) + b*(c + d))*x)/(c^2 + d^2)^2) - (2*(b*c - a*d)*(a*c + b*d)*Log[c*Cos[e
+ f*x] + d*Sin[e + f*x]])/((c^2 + d^2)^2*f) - (b*c - a*d)^2/(d*(c^2 + d^2)*f*(c + d*Tan[e + f*x]))

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rule 3531

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((a*c +
 b*d)*x)/(a^2 + b^2), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3542

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
((b*c - a*d)^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*Ta
n[e + f*x])^(m + 1)*Simp[a*c^2 + 2*b*c*d - a*d^2 - (b*c^2 - 2*a*c*d - b*d^2)*Tan[e + f*x], x], x], x] /; FreeQ
[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && NeQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {(a+b \tan (e+f x))^2}{(c+d \tan (e+f x))^2} \, dx &=-\frac {(b c-a d)^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\int \frac {a^2 c-b^2 c+2 a b d+\left (2 a b c-a^2 d+b^2 d\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{c^2+d^2}\\ &=-\frac {(b (c-d)-a (c+d)) (a (c-d)+b (c+d)) x}{\left (c^2+d^2\right )^2}-\frac {(b c-a d)^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {(2 (b c-a d) (a c+b d)) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{\left (c^2+d^2\right )^2}\\ &=-\frac {(b (c-d)-a (c+d)) (a (c-d)+b (c+d)) x}{\left (c^2+d^2\right )^2}-\frac {2 (b c-a d) (a c+b d) \log (c \cos (e+f x)+d \sin (e+f x))}{\left (c^2+d^2\right )^2 f}-\frac {(b c-a d)^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 2.14, size = 320, normalized size = 2.54 \[ \frac {(a+b \tan (e+f x))^2 (c \cos (e+f x)+d \sin (e+f x)) \left (2 i (e+f x) \left (a^2 c d+a b \left (d^2-c^2\right )-b^2 c d\right ) (c \cos (e+f x)+d \sin (e+f x))+\left (a^2 c d+a b \left (d^2-c^2\right )-b^2 c d\right ) (c \cos (e+f x)+d \sin (e+f x)) \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )+2 i \left (a^2 (-c) d+a b \left (c^2-d^2\right )+b^2 c d\right ) \tan ^{-1}(\tan (e+f x)) (c \cos (e+f x)+d \sin (e+f x))+\frac {\left (c^2+d^2\right ) (b c-a d)^2 \sin (e+f x)}{c}+(e+f x) (a (c+d)+b (d-c)) (a (c-d)+b (c+d)) (c \cos (e+f x)+d \sin (e+f x))\right )}{f \left (c^2+d^2\right )^2 (c+d \tan (e+f x))^2 (a \cos (e+f x)+b \sin (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^2/(c + d*Tan[e + f*x])^2,x]

[Out]

((c*Cos[e + f*x] + d*Sin[e + f*x])*(((b*c - a*d)^2*(c^2 + d^2)*Sin[e + f*x])/c + (b*(-c + d) + a*(c + d))*(a*(
c - d) + b*(c + d))*(e + f*x)*(c*Cos[e + f*x] + d*Sin[e + f*x]) + (2*I)*(a^2*c*d - b^2*c*d + a*b*(-c^2 + d^2))
*(e + f*x)*(c*Cos[e + f*x] + d*Sin[e + f*x]) + (2*I)*(-(a^2*c*d) + b^2*c*d + a*b*(c^2 - d^2))*ArcTan[Tan[e + f
*x]]*(c*Cos[e + f*x] + d*Sin[e + f*x]) + (a^2*c*d - b^2*c*d + a*b*(-c^2 + d^2))*Log[(c*Cos[e + f*x] + d*Sin[e
+ f*x])^2]*(c*Cos[e + f*x] + d*Sin[e + f*x]))*(a + b*Tan[e + f*x])^2)/((c^2 + d^2)^2*f*(a*Cos[e + f*x] + b*Sin
[e + f*x])^2*(c + d*Tan[e + f*x])^2)

________________________________________________________________________________________

fricas [B]  time = 0.65, size = 294, normalized size = 2.33 \[ -\frac {b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3} - {\left (4 \, a b c^{2} d + {\left (a^{2} - b^{2}\right )} c^{3} - {\left (a^{2} - b^{2}\right )} c d^{2}\right )} f x + {\left (a b c^{3} - a b c d^{2} - {\left (a^{2} - b^{2}\right )} c^{2} d + {\left (a b c^{2} d - a b d^{3} - {\left (a^{2} - b^{2}\right )} c d^{2}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {d^{2} \tan \left (f x + e\right )^{2} + 2 \, c d \tan \left (f x + e\right ) + c^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (b^{2} c^{3} - 2 \, a b c^{2} d + a^{2} c d^{2} + {\left (4 \, a b c d^{2} + {\left (a^{2} - b^{2}\right )} c^{2} d - {\left (a^{2} - b^{2}\right )} d^{3}\right )} f x\right )} \tan \left (f x + e\right )}{{\left (c^{4} d + 2 \, c^{2} d^{3} + d^{5}\right )} f \tan \left (f x + e\right ) + {\left (c^{5} + 2 \, c^{3} d^{2} + c d^{4}\right )} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

-(b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3 - (4*a*b*c^2*d + (a^2 - b^2)*c^3 - (a^2 - b^2)*c*d^2)*f*x + (a*b*c^3 - a*b
*c*d^2 - (a^2 - b^2)*c^2*d + (a*b*c^2*d - a*b*d^3 - (a^2 - b^2)*c*d^2)*tan(f*x + e))*log((d^2*tan(f*x + e)^2 +
 2*c*d*tan(f*x + e) + c^2)/(tan(f*x + e)^2 + 1)) - (b^2*c^3 - 2*a*b*c^2*d + a^2*c*d^2 + (4*a*b*c*d^2 + (a^2 -
b^2)*c^2*d - (a^2 - b^2)*d^3)*f*x)*tan(f*x + e))/((c^4*d + 2*c^2*d^3 + d^5)*f*tan(f*x + e) + (c^5 + 2*c^3*d^2
+ c*d^4)*f)

________________________________________________________________________________________

giac [B]  time = 1.59, size = 331, normalized size = 2.63 \[ \frac {\frac {{\left (a^{2} c^{2} - b^{2} c^{2} + 4 \, a b c d - a^{2} d^{2} + b^{2} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} + \frac {{\left (a b c^{2} - a^{2} c d + b^{2} c d - a b d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (a b c^{2} d - a^{2} c d^{2} + b^{2} c d^{2} - a b d^{3}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{c^{4} d + 2 \, c^{2} d^{3} + d^{5}} + \frac {2 \, a b c^{2} d^{2} \tan \left (f x + e\right ) - 2 \, a^{2} c d^{3} \tan \left (f x + e\right ) + 2 \, b^{2} c d^{3} \tan \left (f x + e\right ) - 2 \, a b d^{4} \tan \left (f x + e\right ) - b^{2} c^{4} + 4 \, a b c^{3} d - 3 \, a^{2} c^{2} d^{2} + b^{2} c^{2} d^{2} - a^{2} d^{4}}{{\left (c^{4} d + 2 \, c^{2} d^{3} + d^{5}\right )} {\left (d \tan \left (f x + e\right ) + c\right )}}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x, algorithm="giac")

[Out]

((a^2*c^2 - b^2*c^2 + 4*a*b*c*d - a^2*d^2 + b^2*d^2)*(f*x + e)/(c^4 + 2*c^2*d^2 + d^4) + (a*b*c^2 - a^2*c*d +
b^2*c*d - a*b*d^2)*log(tan(f*x + e)^2 + 1)/(c^4 + 2*c^2*d^2 + d^4) - 2*(a*b*c^2*d - a^2*c*d^2 + b^2*c*d^2 - a*
b*d^3)*log(abs(d*tan(f*x + e) + c))/(c^4*d + 2*c^2*d^3 + d^5) + (2*a*b*c^2*d^2*tan(f*x + e) - 2*a^2*c*d^3*tan(
f*x + e) + 2*b^2*c*d^3*tan(f*x + e) - 2*a*b*d^4*tan(f*x + e) - b^2*c^4 + 4*a*b*c^3*d - 3*a^2*c^2*d^2 + b^2*c^2
*d^2 - a^2*d^4)/((c^4*d + 2*c^2*d^3 + d^5)*(d*tan(f*x + e) + c)))/f

________________________________________________________________________________________

maple [B]  time = 0.26, size = 465, normalized size = 3.69 \[ -\frac {d \,a^{2}}{f \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {2 a b c}{f \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}-\frac {b^{2} c^{2}}{f \left (c^{2}+d^{2}\right ) d \left (c +d \tan \left (f x +e \right )\right )}+\frac {2 \ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} c d}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {2 \ln \left (c +d \tan \left (f x +e \right )\right ) a b \,c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {2 \ln \left (c +d \tan \left (f x +e \right )\right ) a b \,d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {2 \ln \left (c +d \tan \left (f x +e \right )\right ) b^{2} c d}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) a^{2} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right ) a^{2} d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {4 \arctan \left (\tan \left (f x +e \right )\right ) a b c d}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right ) b^{2} c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) b^{2} d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{2} c d}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a b \,c^{2}}{f \left (c^{2}+d^{2}\right )^{2}}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a b \,d^{2}}{f \left (c^{2}+d^{2}\right )^{2}}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) b^{2} c d}{f \left (c^{2}+d^{2}\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x)

[Out]

-1/f/(c^2+d^2)*d/(c+d*tan(f*x+e))*a^2+2/f/(c^2+d^2)/(c+d*tan(f*x+e))*a*b*c-1/f/(c^2+d^2)/d/(c+d*tan(f*x+e))*b^
2*c^2+2/f/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*a^2*c*d-2/f/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*a*b*c^2+2/f/(c^2+d^2)^2*ln
(c+d*tan(f*x+e))*a*b*d^2-2/f/(c^2+d^2)^2*ln(c+d*tan(f*x+e))*b^2*c*d+1/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a^2*c^2
-1/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a^2*d^2+4/f/(c^2+d^2)^2*arctan(tan(f*x+e))*a*b*c*d-1/f/(c^2+d^2)^2*arctan(
tan(f*x+e))*b^2*c^2+1/f/(c^2+d^2)^2*arctan(tan(f*x+e))*b^2*d^2-1/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a^2*c*d+1/f/
(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a*b*c^2-1/f/(c^2+d^2)^2*ln(1+tan(f*x+e)^2)*a*b*d^2+1/f/(c^2+d^2)^2*ln(1+tan(f*x
+e)^2)*b^2*c*d

________________________________________________________________________________________

maxima [A]  time = 0.94, size = 229, normalized size = 1.82 \[ \frac {\frac {{\left (4 \, a b c d + {\left (a^{2} - b^{2}\right )} c^{2} - {\left (a^{2} - b^{2}\right )} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (a b c^{2} - a b d^{2} - {\left (a^{2} - b^{2}\right )} c d\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} + \frac {{\left (a b c^{2} - a b d^{2} - {\left (a^{2} - b^{2}\right )} c d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{c^{3} d + c d^{3} + {\left (c^{2} d^{2} + d^{4}\right )} \tan \left (f x + e\right )}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

((4*a*b*c*d + (a^2 - b^2)*c^2 - (a^2 - b^2)*d^2)*(f*x + e)/(c^4 + 2*c^2*d^2 + d^4) - 2*(a*b*c^2 - a*b*d^2 - (a
^2 - b^2)*c*d)*log(d*tan(f*x + e) + c)/(c^4 + 2*c^2*d^2 + d^4) + (a*b*c^2 - a*b*d^2 - (a^2 - b^2)*c*d)*log(tan
(f*x + e)^2 + 1)/(c^4 + 2*c^2*d^2 + d^4) - (b^2*c^2 - 2*a*b*c*d + a^2*d^2)/(c^3*d + c*d^3 + (c^2*d^2 + d^4)*ta
n(f*x + e)))/f

________________________________________________________________________________________

mupad [B]  time = 6.95, size = 208, normalized size = 1.65 \[ \frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (-2\,a\,b\,c^2+\left (2\,a^2-2\,b^2\right )\,c\,d+2\,a\,b\,d^2\right )}{f\,\left (c^4+2\,c^2\,d^2+d^4\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (a^2+a\,b\,2{}\mathrm {i}-b^2\right )}{2\,f\,\left (-c^2\,1{}\mathrm {i}+2\,c\,d+d^2\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (a^2\,1{}\mathrm {i}+2\,a\,b-b^2\,1{}\mathrm {i}\right )}{2\,f\,\left (-c^2+c\,d\,2{}\mathrm {i}+d^2\right )}-\frac {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}{d\,f\,\left (c^2+d^2\right )\,\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(e + f*x))^2/(c + d*tan(e + f*x))^2,x)

[Out]

(log(c + d*tan(e + f*x))*(c*d*(2*a^2 - 2*b^2) - 2*a*b*c^2 + 2*a*b*d^2))/(f*(c^4 + d^4 + 2*c^2*d^2)) - (log(tan
(e + f*x) - 1i)*(a*b*2i + a^2 - b^2))/(2*f*(2*c*d - c^2*1i + d^2*1i)) - (log(tan(e + f*x) + 1i)*(2*a*b + a^2*1
i - b^2*1i))/(2*f*(c*d*2i - c^2 + d^2)) - (a^2*d^2 + b^2*c^2 - 2*a*b*c*d)/(d*f*(c^2 + d^2)*(c + d*tan(e + f*x)
))

________________________________________________________________________________________

sympy [A]  time = 2.15, size = 4258, normalized size = 33.79 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**2/(c+d*tan(f*x+e))**2,x)

[Out]

Piecewise((zoo*x*(a + b*tan(e))**2/tan(e)**2, Eq(c, 0) & Eq(d, 0) & Eq(f, 0)), (a**2*f*x*tan(e + f*x)**2/(-4*d
**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*a**2*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x
)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - a**2*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4
*d**2*f) + a**2*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*a**2/(-4*d
**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*a*b*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e + f
*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*a*b*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*
tan(e + f*x) + 4*d**2*f) + 2*I*a*b*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*
a*b*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - b**2*f*x*tan(e + f*x)**2/(
-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*I*b**2*f*x*tan(e + f*x)/(-4*d**2*f*tan(e +
 f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + b**2*f*x/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x)
 + 4*d**2*f) + 3*b**2*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*b**2
/(-4*d**2*f*tan(e + f*x)**2 + 8*I*d**2*f*tan(e + f*x) + 4*d**2*f), Eq(c, -I*d)), (a**2*f*x*tan(e + f*x)**2/(-4
*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*I*a**2*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f
*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - a**2*f*x/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) +
 4*d**2*f) + a**2*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*I*a**2/(-4
*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*I*a*b*f*x*tan(e + f*x)**2/(-4*d**2*f*tan(e +
 f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 4*a*b*f*x*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*
f*tan(e + f*x) + 4*d**2*f) - 2*I*a*b*f*x/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*
I*a*b*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - b**2*f*x*tan(e + f*x)**2
/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) - 2*I*b**2*f*x*tan(e + f*x)/(-4*d**2*f*tan(e
 + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + b**2*f*x/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*
x) + 4*d**2*f) + 3*b**2*tan(e + f*x)/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f) + 2*I*b*
*2/(-4*d**2*f*tan(e + f*x)**2 - 8*I*d**2*f*tan(e + f*x) + 4*d**2*f), Eq(c, I*d)), ((a**2*x + a*b*log(tan(e + f
*x)**2 + 1)/f - b**2*x + b**2*tan(e + f*x)/f)/c**2, Eq(d, 0)), (x*(a + b*tan(e))**2/(c + d*tan(e))**2, Eq(f, 0
)), (a**2*c**3*d*f*x/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**
5*f + d**6*f*tan(e + f*x)) + a**2*c**2*d**2*f*x*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**
3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + 2*a**2*c**2*d**2*log(c/d + tan(e + f*x))/
(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e +
f*x)) - a**2*c**2*d**2*log(tan(e + f*x)**2 + 1)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*
d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - a**2*c**2*d**2/(c**5*d*f + c**4*d**2*f*tan(e + f*x) +
2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - a**2*c*d**3*f*x/(c**5*d*f + c**
4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + 2*a**2*
c*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4
*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - a**2*c*d**3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c**5*d*
f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) -
a**2*d**4*f*x*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) +
 c*d**5*f + d**6*f*tan(e + f*x)) - a**2*d**4/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**
4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - 2*a*b*c**3*d*log(c/d + tan(e + f*x))/(c**5*d*f + c**4*d**
2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + a*b*c**3*d*l
og(tan(e + f*x)**2 + 1)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*
d**5*f + d**6*f*tan(e + f*x)) + 2*a*b*c**3*d/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**
4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + 4*a*b*c**2*d**2*f*x/(c**5*d*f + c**4*d**2*f*tan(e + f*x)
+ 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - 2*a*b*c**2*d**2*log(c/d + tan
(e + f*x))*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*
d**5*f + d**6*f*tan(e + f*x)) + a*b*c**2*d**2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*ta
n(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + 4*a*b*c*d**3*f*x*t
an(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**
6*f*tan(e + f*x)) + 2*a*b*c*d**3*log(c/d + tan(e + f*x))/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f
+ 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - a*b*c*d**3*log(tan(e + f*x)**2 + 1)/(c**5*d*f
 + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + 2
*a*b*c*d**3/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**
6*f*tan(e + f*x)) + 2*a*b*d**4*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c
**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - a*b*d**4*log(tan(e + f*x)**2 + 1)*
tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d*
*6*f*tan(e + f*x)) - b**2*c**4/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*
x) + c*d**5*f + d**6*f*tan(e + f*x)) - b**2*c**3*d*f*x/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f +
2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - b**2*c**2*d**2*f*x*tan(e + f*x)/(c**5*d*f + c**
4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - 2*b**2*
c**2*d**2*log(c/d + tan(e + f*x))/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e +
 f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + b**2*c**2*d**2*log(tan(e + f*x)**2 + 1)/(c**5*d*f + c**4*d**2*f*tan(
e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) - b**2*c**2*d**2/(c**5
*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x))
 + b**2*c*d**3*f*x/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*
f + d**6*f*tan(e + f*x)) - 2*b**2*c*d**3*log(c/d + tan(e + f*x))*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e +
f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)) + b**2*c*d**3*log(tan(e +
f*x)**2 + 1)*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**3*f + 2*c**2*d**4*f*tan(e + f*x) +
c*d**5*f + d**6*f*tan(e + f*x)) + b**2*d**4*f*x*tan(e + f*x)/(c**5*d*f + c**4*d**2*f*tan(e + f*x) + 2*c**3*d**
3*f + 2*c**2*d**4*f*tan(e + f*x) + c*d**5*f + d**6*f*tan(e + f*x)), True))

________________________________________________________________________________________